﻿@using SplendidCRM
@using SplendidCRM.Ext
@using SplendidCRM.Ext.Helpers
@using SplendidCRM.Ext.Models

@model QueryHistoryOfPaymentModel

@{
    var formId = Guid.NewGuid();
}

<form id="@formId" action="" autocomplete="off" data-bind="noSubmit: true">    
<div class="form-section ui-inline-template" data-bind="each: { source: model }">
    @Html.Field(FieldType.Text, new { fieldLabel = "Phone number", containerClass = "solid-border", value = "2077800535" }, "value: PhoneNumber")
    @Html.Field(FieldType.Text, new { fieldLabel = "Start Date (dd/MM/yyyy)", containerClass = "solid-border", value = "01/09/2011" }, "value: StartDate")
    @Html.Field(FieldType.Text, new { fieldLabel = "End Date  (dd/MM/yyyy)", containerClass = "solid-border", value = "30/11/2011" }, "value: EndDate")
    <div class="clear"></div>
    <input type="submit" class="form-button" value="Submit" href="@Url.Action("QueryHistoryOfPayment")" data-bind="send: { stringify: true, update: '#@formId-list', dataType: 'html' }" />

</div>
</form>

<div id="@formId-list" style="clear:both"></div>

<script type="text/javascript">
$(function () {
    var model = @Html.Raw(Model.Json(true)) ;
    linq.model(model, '#@formId');
});

</script>